package cn.mcch.investigator.dialog;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RadioGroup;

import cn.mcch.investigator.R;
import cn.mcch.investigator.application.InvestigatorApplication;
import cn.mcch.investigator.listener.OnCommonClickListener;

/**
 * Created by Administrator on 2016/12/22.
 */
public class CancelRescueDialog extends BaseDialog {

    private OnCommonClickListener l;

    private String orderNo;


    public CancelRescueDialog setOnClickListener(OnCommonClickListener l) {
        this.l = l;
        return this;
    }

    public CancelRescueDialog setOrderNo(String orderNo) {
        this.orderNo = orderNo;
        return this;
    }

    @Override
    protected void initEventListener() {
        setOnClickListener(l, R.id.sb_yes_cancel_rescue);
    }

    @Override
    protected View initView(LayoutInflater inflater, ViewGroup container) {
        return View.inflate(InvestigatorApplication.getInstance(), R.layout.dialog_cancel_rescue, null);
    }

    public String getOther() {
        return ((RadioGroup) findViewById(R.id.rg_cancel_rescue)).getCheckedRadioButtonId() == R.id.rb_jckc ? "1" : "2";
    }
}
